//
//  MGSaveLocation.m
//  MaiMaiGo
//
//  Created by maimaigo3 on 2017/4/20.
//  Copyright © 2017年 qian. All rights reserved.
//

#import "MGSaveLocation.h"

@implementation MGSaveLocation

#define MGLocation [NSUserDefaults standardUserDefaults]


+ (void)saveSelectselectCity:(NSString *)selectCity{
    [MGLocation setObject:selectCity forKey:@"selectCity"];
    [MGLocation synchronize];
}

+ (void)saveSelectLongitude:(NSString *)longitude{
    [MGLocation setObject:longitude forKey:@"longitude"];
    [MGLocation synchronize];
}

+ (void)saveSelectLatitude:(NSString *)latitude{
    [MGLocation setObject:latitude forKey:@"latitude"];
    [MGLocation synchronize];
}

+(NSString *)getSelectLongitude
{
    return [MGLocation objectForKey:@"longitude"]?:@"";
}

+ (NSString *)getLatitude {
    NSString * getLatitude = [MGLocation objectForKey:@"latitude"];
    if (!getLatitude) {
        getLatitude =@"";
    }
    return getLatitude;
}

+(NSString *)getSelectLatitude
{
    return [MGLocation objectForKey:@"latitude"]?:@"";
}
@end
